home *** CD-ROM | disk | FTP | other *** search
/ World of Video / World of Video.iso / rexx / magiccx / basrevision.ttx < prev    next >
Text File  |  1995-02-13  |  2KB  |  76 lines

  1. /*
  2.     $VER: BASRevision.ttx 1.0 (12.8.94)
  3.  
  4.     Revises an Basic source code
  5.     The default Port of MagicCX is assumed to be MagicCX.
  6.     This script was written for CygnusED II Pro, but I think it can
  7.      be easily ported to other editors having an ARexx-Port.
  8.  
  9.     Written by : Kai Iske
  10.              Brucknerstrasse 18
  11.              63452 Hanau
  12.              GERMANY
  13.              Tel.: +49-(0)6181-850181
  14.  
  15.     THIS SCRIPT IS PUBLIC DOMAIN
  16.  
  17.     Modified for use with TurboText by Joachim Worringen 10.01.93
  18.     FIDO:    2:242/7.3
  19.     E-Mail:  Joachim_Worringen@mowgli.fido.de
  20.  
  21.     The cursorpositioning looks a little bit complicated, but the
  22.     "Bookmark"-funtion couldn`t be used in this case since TurboText
  23.     forgets all the old bookmarks if you load a new file (exactly what
  24.     happens here) so I had to choose this method.
  25. */
  26.  
  27. OPTIONS RESULTS
  28.  
  29. /*
  30.    Standard defines for INITIALVER INITIALREV INSERTBEFORE AND INSERTAFTER
  31.    (Please add complete paths for the files!)
  32. */
  33.  
  34. INITVER        = 1
  35. INITREV        = 0
  36. INSBEFORE    = BASInsertBeforeHeader
  37. INSAFTER    = BASInsertAfterHeader
  38.  
  39.  
  40.  
  41. GetFileInfo
  42. parse var RESULT lines_old ' ' modified ' ' name
  43.  
  44. if name = "" then
  45. do
  46.     SetStatusBar "No file name -- aborting"
  47.     exit 0
  48. end
  49. IF modified = YES THEN SaveFile
  50.  
  51. GetCursorPos
  52. parse var RESULT line . .
  53.  
  54. GetFilePath
  55. RevName = RESULT
  56.  
  57. QUOTE    = '22'X
  58.  
  59. ADDRESS 'MCX' REVISE 'FILE='QUOTE''RevName''QUOTE 'MODE=BAS' 'PUBSCREEN=TurboText' 'INITIALVER='INITVER 'INITIALREV='INITREV 'INSERTBEFORE='INSBEFORE 'INSERTAFTER='INSAFTER
  60. RevDone = RESULT
  61.  
  62. Screen2Front
  63.  
  64. IF RevDone = 'TRUE' THEN
  65. DO
  66.     OpenFile RevName
  67.     GetFileInfo
  68.     parse var RESULT lines_new . .
  69.     Move line + lines_new - lines_old
  70.     CenterView
  71. END
  72. ELSE
  73.     SetStatusBar "Error on revising !"
  74. exit
  75.  
  76.